package com.example.filter_interceptor_test.filter;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/**
 * @author sorata
 * @since 2023/2/1 22:35
 */
public class Filter1 implements Filter {
    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("Filter1  before " + ((HttpServletRequest)request).getRequestURI() + "  " + Thread.currentThread().getName());
        chain.doFilter(request,response);
        System.out.println("Filter1  after " + ((HttpServletRequest)request).getRequestURI() + "  " + Thread.currentThread().getName());
    }
}
